using System;

namespace Ganweisoft.IoTCenter.Module.MediaPlatform.Utilities
{
    public class ApiException : Exception
    {
        public string ErrorCode { get; set; }
        public ApiException() : base()
        {
            ErrorCode = ApiErrorCodes.InternalServerError;
        }
        public ApiException(string message) : this(message, ApiErrorCodes.InternalServerError, null)
        {

        }
        public ApiException(string message, string errorCode) : this(message, errorCode, null)
        {

        }

        public ApiException(string message, string errorCode, Exception innerException)
            : base(message, innerException)
        {
            ErrorCode = errorCode;
        }
    }
}
